
%label
  %a{ :href => "http://www.udesk.cn/doc/apiv2/im/", :title => "文档", target: '_blank' }
    点此跳到APIV2文档| 
%label
  %a{ :href => "https://github.com/udesk/open_udesk_doc/blob/master/doc/im.md", :title => "文档", target: '_blank' }
    点此跳到APIV2 GITHUB 文档
%form{:method => 'POST', :action => "/projects/#{@project.id}/set_settings_v2" }
  = hidden_field_tag :authenticity_token, form_authenticity_token
  %input{:type => 'text', :name => 'id',  :value => @project.id, :hidden => true }

  %table{:width => '800px'}
    %tr
      %td{:width => '200px'}
        %label{:for => 'server_domain'} 
        域名:
        %input{:type => 'text',:name => 'server_domain',  :value => @rds[:server_domain] || ""}
      %td{:width => '200px'}
        %label{:for => 'email'}
        管理员email:
        %input{:type => 'text',:name => 'email',  :value => @rds[:email] || ""}
      %td{:width => '200px'}
        %label{:for => 'password'}
        管理员password:
        %input{:type => 'password',:name => 'password',  :value => @rds[:password] || ""}
    %tr
      %td
        %input{:type => 'submit', :value => '保存'}
    %tr
      %td
        推送地址:
        = "http://imdev.udeskmonkey.com:4568/projects/#{@project.id}/recv_v2"
%p
%hr
%h2 请求token
%p
= "https://#{@rds[:server_domain]}/open_api_v1/log_in"
%p
= "open_api_auth_token: #{@rds[:open_api_auth_token]}"
%form{:method => 'POST', :action => "/projects/#{@project.id}/get_open_api_auth_token_v2" }
  = hidden_field_tag :authenticity_token, form_authenticity_token
  %input{:type => 'submit', :value => '重新请求'}
%p